Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Debounce annotation validation #71884

Closed

Conversation

qn895
Copy link
Member

@qn895 qn895 commented Jul 15, 2020

Summary

This PR debounces the input when editing annotation text so the validation isn't run every single time the user types. This is part of the #69538. There will be a follow up PR to address more of the performance problems, especially in the Anomaly Explorer tab.

Checklist

Delete any items that are not applicable to this PR.

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@@ -177,6 +177,8 @@ class AnnotationFlyoutUI extends Component<CommonProps & Props> {
return errors;
};

public debouncedValidateAnnotationText = debounce(this.validateAnnotationText, 300);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless this is called by something externally, it should probably be private

@qn895
Copy link
Member Author

qn895 commented Jul 15, 2020

After discussing with Pete, we both think the change doesn't make that dramatic of a difference so I'm gonna shelve this PR for now until we fix the performance issues with the AE/annotation flyout.

@qn895 qn895 closed this Jul 15, 2020
@qn895 qn895 deleted the ml-debounce-annotation-validation branch August 12, 2020 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants